import { get, post } from '@/utils/request'

export default class FlowEntryController {
  static list(params) {
    return post(`/service-workflow/b/flow/flowEntry/v1/list`, params)
  }

  static view(params) {
    return get(`/service-workflow/b/flow/flowEntry/v1/view`, params)
  }

  static add(params) {
    return post(`/service-workflow/b/flow/flowEntry/v1/add`, params)
  }

  static update(params) {
    return post(`/service-workflow/b/flow/flowEntry/v1/update`, params)
  }

  static delete(params) {
    return post(`/service-workflow/b/flow/flowEntry/v1/delete`, params)
  }

  static publish(params) {
    return post(`/service-workflow/b/flow/flowEntry/v1/publish`, params)
  }

  static listFlowEntryPublish(params) {
    return get(`/service-workflow/b/flow/flowEntry/v1/listFlowEntryPublish`, params)
  }

  static listByCategoryId(params) {
    return post(`/service-workflow/b/flow/flowEntry/v1/listByCategoryId`, params)
  }

  static updateMainVersion(params) {
    return post(`/service-workflow/b/flow/flowEntry/v1/updateMainVersion`, params)
  }

  static suspendFlowEntryPublish(params) {
    return post(`/service-workflow/b/flow/flowEntry/v1/suspendFlowEntryPublish`, params)
  }

  static activateFlowEntryPublish(params) {
    return post(`/service-workflow/b/flow/flowEntry/v1/activateFlowEntryPublish`, params)
  }

  static viewDict(params) {
    return get(`/service-workflow/b/flow/flowEntry/v1/viewDict`, params)
  }

  static listDict(params) {
    return get(`/service-workflow/b/flow/flowEntry/v1/listDict`, params)
  }
}
